package tmproject.hlhj.fhp.tmvote.presenters

import android.content.Context
import com.example.mymvp.BasePresenter
import tmproject.hlhj.fhp.tmvote.beans.AppColorBean
import tmproject.hlhj.fhp.tmvote.beans.VoteListBean
import tmproject.hlhj.fhp.tmvote.log
import tmproject.hlhj.fhp.tmvote.module.VoteListModule
import tmproject.hlhj.fhp.tmvote.views.VoteListView

/**
 * Created by Never Fear   on 2018\8\6 0006.
Never More....
 */
class VoteListPresenter : BasePresenter<VoteListModule, VoteListView>(), VoteListModule.VoteListResp {
    override fun createModule() {
        module= VoteListModule()
        module.listener=this
    }

    fun getVoteListData(page:Int,pageSize:Int,context: Context){
        module.getVoteListData(page,pageSize,context)
    }

    fun getAppColor(context: Context){
        module.getAppColor(context)
    }
    override fun onResp(voteListBean: VoteListBean) {
        view?.onVoteListResp(voteListBean)
    }
    fun initView2(){
        view?.initView()
    }

    fun setListener2(){
        view?.setListener()
    }
    fun logicStart2(){
        view?.logicStart()
    }
    override fun onColorBack(appColorBean: AppColorBean) {
        view?.onColorBack(appColorBean)
    }
}